package com.sqx.modules.userGetPhoneRecord.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.userGetPhoneRecord.entity.UserGetPhoneRecord;
import com.sqx.modules.userGetPhoneRecord.service.IUserGetPhoneRecordService;
import com.sqx.modules.userGetPhoneRecord.vo.UserGetPhoneRecordVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 用户购买记录表
 *
 * @author wuchang
 * @since 2023-07-05
 */
@RestController
@RequestMapping("/admin/userGetPhoneRecord/")
@Api(value = "管理端-购买记录表", tags = {"管理端-购买记录表"})
public class AdminUserGetPhoneRecordController {
    @Autowired
    private IUserGetPhoneRecordService getPhoneRecordService;


    @ApiOperation("获取指定用户的购买记录")
    @GetMapping("getByPhoneList")
    public Result getByPhoneList(Integer page, Integer limit, UserGetPhoneRecordVo phoneRecordVo) {
        return Result.success().put("data", getPhoneRecordService.getByPhoneList(page, limit, phoneRecordVo));
    }
}
